#ifndef REGISTERRESPONSEMESSAGE_H
#define REGISTERRESPONSEMESSAGE_H

#include "./entities/message/superClass/message.h"

/*
Json数据格式
{
    "messageType": [RegisterResponse](int)
    "status": ["success", "failure"](string)
    "reason": ["verified pass", "email already exists"](string)
}
*/
class RegisterResponseMessage : public Message
{
public:
    RegisterResponseMessage() = delete;

    RegisterResponseMessage(const Status& status, const Reason& reason, const UserId& userId);
    RegisterResponseMessage(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    Status getStatus() const;
    Reason getReason() const;
    UserId getUserId() const;


private:
    Status m_status;
    Reason m_reason;
    UserId m_userId;

};

// 编译时注册
Q_DECLARE_METATYPE(RegisterResponseMessage)

#endif // REGISTERRESPONSEMESSAGE_H
